package gameStates.absGamesStates.network;

import interfaces.hud.chat.ChatType;

import java.util.HashMap;

import gameStates.absGamesStates.AbsIngameState;
import logic.common.player.Player;
import logic.nodes.TeamNode;
import logic.weapons.Weapon;
import logic.weapons.WeaponFire;
import networking.SyncManager;
import networking.Synchronizable;

import com.captiveimagination.jgn.clientserver.JGNConnectionListener;
import com.captiveimagination.jgn.event.MessageListener;

public interface AbsNetworkState extends JGNConnectionListener, MessageListener {
	
	public SyncManager getSyncManager();
	
	public void unregisterObject(Synchronizable obj);
	
	public Player getPlayer(int playerID);
	
	public void registerSyncObject(Synchronizable synchronizable);
	
	public AbsIngameState getIngameState();
	
	public void registerNewWeapon(Weapon weapon);
	
	public void unregisterWeapon(Weapon weapon);
		
	public void registerStaticObject(TeamNode teamNode);
		
	public void registerWeaponFire(int weaponIndex, WeaponFire fire);
	
	public void setIngameState(AbsIngameState ingameState);
	
	public Player getPlayerFromShort(short playerId);
	
	public short getPlayerShortID(int playerID);
	
	public HashMap<Short, Integer> getHumanPlayersShort();
	
	public void registerWeaponFire(WeaponFire fire, int fireID);
	
	public void cleanup();
	
	public void sendChatMessage(String text, ChatType type);
	
	public void unregisterWeaponFire(WeaponFire weaponFire);
}